<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Control</title>
        <script src="../../py/system.js" type="text/javascript"></script>
		<script src="../../py/system/dom/element.js" type="text/javascript"></script>
		<script src="../../py/system/controls/control.js" type="text/javascript"></script>
		<script src="../../py/system/controls/itargetedcontrol.js" type="text/javascript"></script>
		<script src="../../py/system/dom/drag.js" type="text/javascript"></script>
		
		<script src="../../common/project/project.js" type="text/javascript"></script>
		<script src="../../common/assets/scripts/default.js" type="text/javascript"></script>
		<script src="../../common/assets/scripts/debug.js" type="text/javascript"></script>	
	</head>
	<body>
		
		
		<div id="target" style="background: yellow; width: 50px; height: 60px; ">
			拖动本块。
		</div>
		
		<div id="o" style="background: blue; position: absolute; top: 50px;   width: 300px; height: 200px; "></div>
		
		
		<script>
			
			
			var TargetedControl = Control.extend({}).implement(Py.ITargetedControl);
			
			var d = new  TargetedControl('o');
			
			$('target').setUnselectable().setDraggable().on('dragend', function(){
				d.showBy(this, 0, 0);
			});
			
			
		
		</script>
	</body>
</html>
